<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="js/base.js"></script>
</head>
<body>
    <button onclick="onButtonClick();">请求服务器数据</button>
<script>
    function onButtonClick(){
        localStorage.setItem("token","dfoi2jlkejofindosif");
        let url="http://localhost:9001/qf/user/test";
        $.rest("get",url,null,function(r){
            if(r.ok){
                alert(JSON.stringify(r));
            }
        });
    }
</script>
</body>
</html>